package com.jamiexu.lua.interpreter.token;

public class Token {

    public enum TYPE {
        CHARATCTER,//字符
        STRING,//字符串
        INTEGER,//数字
        OPERATOR,
        EQUAL,// =
        SYMBOL,//符号
        EOF//结尾
    }

    public TYPE type;
    public Object value;
    public final int lineNo;
    public final int columnNo;


    public Token(TYPE type, Object value, int lineNo, int columnNo) {
        this.type = type;
        this.value = value;
        this.lineNo = lineNo;
        this.columnNo = columnNo;
    }

    @Override
    public String toString() {
        return "Token{" +
                "type=\"" + type +
                "\", value=\"" + value +
                "\", lineNo=\"" + lineNo +
                "\", columnNo=\"" + columnNo +
                "\"}";
    }
}
